<?php
namespace core\tv\validate;

use core\Validate;

class VideoSourceValidate extends Validate
{

    /**
     * 规则
     *
     * @var unknown
     */
    protected $rule = [
        'video_id' => 'require',
        'chapter' => 'require',
        'cover' => 'require',
        'play_sort' => 'number',
        'source_src' => 'require'
    ];

    /**
     * 提示
     *
     * @var unknown
     */
    protected $message = [
        'video_id.require' => '视频ID为空',
        'chapter.require' => '视频章节为空',
        'cover.require' => '章节封面为空',
        'play_sort.number' => '无效的排序值',
        'source_src.require' => '原始资源路径为空'
    ];

    /**
     * 场景
     *
     * @var unknown
     */
    protected $scene = [
        'add' => [
            'video_id',
            'chapter',
            'cover',
            'source_src',
            'play_sort'
        ],
        'edit' => [
            'video_id',
            'chapter',
            'cover',
            'source_src',
            'play_sort'
        ]
    ];
}